﻿@using KMF.Utility
@using KMF.WebUI.CustomHelpers
@using KMF.WebUI.Models
@model List<KMF.Common.ProductRateByCateTopListPagingDto>
<div class="concern_tittle"><span> Sản phẩm cùng loại</span> <span class="product_count">(20 sản phẩm)</span></div>
<div class="carousel">
    @if (Model.Any())
    {
        <ul class="bxcarousel">

            @foreach (var item in Model)
            {

                var pDetailLink = Url.Action("Index", "ProductDetail", new { productId = item.Id, productName = StringUtil.RemoveSpecialCharactersVn(item.Name) });
                <li>


                    <div class="home_image">
                        <a href="@pDetailLink">
                            <img src="@item.ImagePath.ImagePathThumb(159, 243)" width="159" height="243" alt="@item.Name" class="lzLoading"/></a>
                        @if (item.PromotionPrice > 0)
                        {
                            <span class="product_discount">-@item.DiscountPercentage.ToString("#.#")%</span>
                        }

                    </div>
                    <a class="product_title" href="@pDetailLink">@item.Name</a>
                    <span class="home_price">@item.Price.ToString("##,###,###") đ</span>
                    <a href="#" class="home_cart"></a><a href="@pDetailLink" class="home_readmore"></a>
                </li>
            }

        </ul>
    }
</div>

